package demo.spring.restful.domain;

/**
 *
 * Created with IntelliJ IDEA.
 * User: zhaocw
 * To change this template use File | Settings | File Templates.
 */
public final class Computer {
	private long id;
    
    private String type;
     
    private double size;
     
    private double price;
 
    public Computer(){
        id=0;
    }
     
    public Computer(long id, String type, double size, double price){
        this.id = id;
        this.type = type;
        this.size = size;
        this.price = price;
    }
     
    public long getId() {
        return id;
    }
 
    public void setId(long id) {
        this.id = id;
    }
 
    public String getType() {
        return type;
    }
 
    public void setType(String type) {
        this.type = type;
    }
 
    public double getSize() {
        return size;
    }
 
    public void setSize(double size) {
        this.size = size;
    }
 
    public double getPrice() {
        return price;
    }
 
    public void setPrice(double price) {
        this.price = price;
    }
 
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + (int) (id ^ (id >>> 32));
        return result;
    }
 
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Computer other = (Computer) obj;
        if (id != other.id)
            return false;
        return true;
    }
 
    @Override
    public String toString() {
        return "User [id=" + id + ", type=" + type + ", size=" + size
                + ", price=" + price + "]";
    }
 

}
